﻿        <?php
                include("code/DataProvider.php");
                $idsua = $_GET["id"];
                $query= " SELECT * FROM sanpham WHERE MaSP = '".$idsua."'";
                $result=DataProvider::executeQuery($query);  
                $row= mysql_fetch_array($result);
        ?>
    <h2 style="color: blue; text-align: center;">Sản phẩm <?php echo $row['TenSP']; ?></h2>
    
        <form action="admin.php?act=12&id=<?php echo $row['MaSP'] ?>" method="post" enctype="multipart/form-data">
          <table width="800px" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="150px" style="color: blue;">Tên sản phẩm</td>
                <td><input name="tensp"type="text" value="<?php echo $row['TenSP'];?>" width="" style="color: #616161;"/></td>
            </tr>
            <tr>
                <td style="color: blue;">Hình </td>
                <td>
                    <form method="post" enctype="multipart/form-data" action="#">
                    	<table width="350" border="0" cellpadding="1" cellspacing="1">
                        	<tr>
                            	<td width="246">
                                	<input class="button" type="hidden" name="MAX_FILE_SIZE" value="1000000" />
                                    <input class="button" name="userfile" type="file" id="userfile" />
                                </td>
                            </tr>
                        </table>
                    </form>
                </td>
            </tr>
            <tr>
                <td style="color: blue;">Số lượng tồn</td>
                <td><input name="soluongton"  type="text" value="<?php echo $row['SoLuongTon']; ?>" style="color: #616161;"/></td>
            </tr>
            <tr>
                <td style="color: blue;">Giá sản phẩm</td>
                <td><input name="gia" type="text" value="<?php echo $row['GiaSP']; ?>"style="color: #616161;"/></td>
            </tr>
            <tr>
                <td style="color: blue;">Mô tả sản phẩm</td>
                <td><textarea name="mota" rows="6" style="width: 700px;" style="color: #616161;"><?php echo $row['MoTaSP']; ?>  </textarea></td>
            </tr>
          </table>
          <div>
                <input  type="submit" value="Cập nhật" style="margin-left: 400px"/>
          </div>
        </form>
